package com.gaofans.vertx.boot.web.csrf;

import io.vertx.ext.web.handler.CSRFHandler;
import org.springframework.lang.NonNull;

import java.util.LinkedHashSet;
import java.util.Set;

/**
 * csrf属性
 * @author GaoFans
 */
public class CsrfHandlerProperties {

    private Set<String> path = new LinkedHashSet<>();

    private String secret;

    private String errorMessage = CSRFHandler.ERROR_MESSAGE;

    private String cookieName = CSRFHandler.DEFAULT_COOKIE_NAME;

    private String cookiePath = CSRFHandler.DEFAULT_COOKIE_PATH;

    private String headerName = CSRFHandler.DEFAULT_HEADER_NAME;

    private String responseBody = CSRFHandler.DEFAULT_RESPONSE_BODY;

    private long timeout = 1800000L;

    private boolean nagHttps = false;

    public Set<String> getPath() {
        return path;
    }

    public void setPath(Set<String> path) {
        this.path = path;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(@NonNull String secret) {
        this.secret = secret;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public String getCookieName() {
        return cookieName;
    }

    public void setCookieName(String cookieName) {
        this.cookieName = cookieName;
    }

    public String getCookiePath() {
        return cookiePath;
    }

    public void setCookiePath(String cookiePath) {
        this.cookiePath = cookiePath;
    }

    public String getHeaderName() {
        return headerName;
    }

    public void setHeaderName(String headerName) {
        this.headerName = headerName;
    }

    public String getResponseBody() {
        return responseBody;
    }

    public void setResponseBody(String responseBody) {
        this.responseBody = responseBody;
    }

    public long getTimeout() {
        return timeout;
    }

    public void setTimeout(long timeout) {
        this.timeout = timeout;
    }

    public boolean isNagHttps() {
        return nagHttps;
    }

    public void setNagHttps(boolean nagHttps) {
        this.nagHttps = nagHttps;
    }
}
